<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery-3.6.0.js"></script>
</head>
<body>
    <form action="" method="POST">
    <input type="checkbox" name="checked" id="">同意并接受注册协议
    <br>
    <button name="push">提交</button>
    </form>
    <script>
        console.log($('button'));
        $('button').click(function(){
            if ($('input').is(":checked")!=true){
                alert('不同意协议，我们将无法为您提供服务');
            }else{
                alert('提交成功');
            }
        })
    </script>
</body>
</html>